package com.zhx.qrcode.controller;


import com.zhx.qrcode.qrcode.ZxingUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class QrCodeController {

    @RequestMapping("/")
    public String createImg(String text, Model model) throws Exception {
//       return ZxingUtil.createImage(text,null);
//       return ZxingUtil.normal(text);
        model.addAttribute("img",ZxingUtil.color(text));
       return "qrcode";
    }
}
